import $ from '@/config/http.js';

/**
住院预约的功能
接口地址
http://dev.cr-health.com:4499/showdoc/index.php/Home/item/show?keyword=queryBindPatInfo&item_id=8


3.3.11查询医院字典数据信息：
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/queryDictionaries/{hospitalId}

3.3.12查询医院省市字典信息
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/querySieDictionaries/{hospitalId}

3.3.10查询绑定的就诊人列表
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/queryBindPatInfo    1

6.3.8查询医院入院通知书序列号
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/queryNoticeSerialNo  1.1 点击某个人

6.3.9根据入院通知序列号查询登记详情
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/getDetailByNoticeSerialNo/{noticeSerialNo} 2 继续填写 公用

6.3.10入院登记信息保存
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/saveResidentAdmitNote  

6.3.11更新按时入院状态
http[s]://[ip]:[port]/crPatient/cxf/rest/inHospitalRegistration/updateOntimeInHospitalStateRequestDTO


 */

export const post_demo = (params) => {
  return $.post('/cxf/rest/follow/doctorComment', params);
};

export const get_demo = (patId) => $.get(`/cxf/rest/medicalCard/getCard/${patId}`);

//查询医院省市字典信息
export const getProvCityCounty = (hospitalId) =>
  $.get(`/cxf/rest/inHospitalRegistration/querySieDictionaries/${hospitalId}`);

//查询医院字典数据信息
export const queryDictionaries = (hospitalId) =>
  $.get(`/cxf/rest/inHospitalRegistration/queryDictionaries/${hospitalId}`);

//根据入院通知序列号查询登记详情
export const getDetailByNoticeSerialNo = (noticeSerialNo) =>
  $.get(`/cxf/rest/inHospitalRegistration/getDetailByNoticeSerialNo/${noticeSerialNo}`);

//查询绑定的就诊人信息
export const queryBindPatInfo = (params) => {
  return $.post('/cxf/rest/inHospitalRegistration/queryBindPatInfo', params);
};

//查询医院入院通知书序列号(广西二院)
export const queryNoticeSerialNo = (params) => {
  return $.post('/cxf/rest/inHospitalRegistration/queryNoticeSerialNo', params);
};

//提交住院
export const saveResidentAdmitNote = (params) => {
  return $.post('/cxf/rest/inHospitalRegistration/saveResidentAdmitNote', params);
};

//更新按时入院状态(广西二院)
export const updateOntimeInHospitalStateRequestDTO = (params) => {
  return $.post('/cxf/rest/inHospitalRegistration/updateOntimeInHospitalStateRequestDTO', params);
};
